<h1><?php echo $title;?></h1>

		<?php if (isset($error)) :?>
		<p class="error">
		<?php foreach ($error as $key => $val) : ?>
		<?php echo $val ?> <br />
		<?php endforeach; ?>
		</p>
		<?php endif; ?>
<?php 
$msg = "";
$msg = $this->plugin->apply_filters('album_photo_add_form', $msg);
echo $msg;
?>

<form  enctype="multipart/form-data" class="edit" action="<?php echo site_url('album/sary/ampidiro')?>" method="post" accept-charset="utf-8">
		<input type="hidden" name="sid" value="<?php echo (isset($row['sid'])?$row['sid'] : "") ?>" />

		<?php if ($notice = $this->session->flashdata('notification')):?>
		<p class="notice"><?php echo $notice;?></p>
		<?php endif;?>
		
		<label for="title"><?php echo __("Photo name:", $this->template['module'])?> </label>
		<input type="text" name="title" value="<?php echo (isset($row['title'])?$row['title'] : "")  ?>" id="tags" class="input-text" /><br />
		
		<?php if(isset($albums)): ?>
		<label for="aid"><?php echo __("Album:", $this->template['module'])?> </label>
		<select name="aid" class="input-select">
		<?php foreach($albums as $as): ?>
		<option value="<?php echo $as['aid'] ?>" <?php if((isset($row['aid']) && $as['aid'] == $row['aid']) || $aid == $as['aid'])  echo " selected "; ?> ><?php echo $as['title'] ?></option>
		<?php endforeach; ?>
		</select> <a href="<?php echo site_url('album/ampidiro') ?>"><?php echo __("Create another album", "album") ?></a><br />
		<?php else: ?>
		<input type="hidden" name="aid" value="<?php echo $aid ?>" />
		<?php endif; ?>
		
		<label for="description"><?php echo __("Description", $this->template['module'])?>:</label>
		<textarea name="description" class="input-textarea" style="height: 100px"><?php echo (isset($row['description'])?$row['description'] : "") ?></textarea><br />

		<label for="image"><?php echo __("Photo", $this->template['module'])?>:</label>
		<input type="file" name="image" class="input-text" />
		
		<input type="submit" name="submit" value="<?php echo __("Save", $this->template['module'])?>" class="input-submit" />
		<a href="javascript:history.back()" class="input-submit"><?php echo __("Cancel", $this->template['module'])?></a>

		</form>
